import { defineStore } from 'pinia'
import { ref } from 'vue'

const useUserInfoStore = defineStore("userInfo",()=>{
    //状态相关的内容
    const info =ref({})
    //为状态赋值
    const setInfo = (newInfo)=>{
        info.value = newInfo
    }
    //清除状态的值
    const removeInfo =()=>{
        info.value = {}
    }

    return {info,setInfo,removeInfo}
},{persist:true})


export default useUserInfoStore;